package com.chance.cc.crawler.prod.command.trigger.domain.vm.autohome;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.AutoHomeCommonCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.adhoc.AutoHomeSimpleRedisToRunCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2021-04-08 14:01:19
 * @email okprog@sina.com
 */
public class AutoHomeSimpleCrawlerSchedulerTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {
      //  publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomePraiseSimpleCrawlerSchedulerJob.autoHomeScheduler());

//        publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeForumReplySimpleCrawlerSchedulerJob.autoHomeScheduler());

//        publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeArticleSimpleCrawlerSchedulerJob.autoHomeScheduler());
//        publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomVideoSimpleCrawlerScheduleJob.autoHomeScheduler());

//        publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeForumReplySimpleCrawlerSchedulerJob.autoHomeScheduler());
   //    publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeForumReleaseSimpleCrawlerSchedulerJob.autoHomeScheduler());
//        publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeCheArticleSimpleCrawlerSchedulerJob.autoHomeScheduler());

        //吉利项目
       // publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeForumJeelyReleaseCrawlerSchedulerJob.autoHomeScheduler());
        //四垂媒任务采集
       publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeSimpleRedisToRunCrawlerScheduleJob.autohomeScheduleCarHomeArticle());//车家号文章
       // publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeSimpleRedisToRunCrawlerScheduleJob.autohomeScheduleCarHomeVideo());//车家号视频
        //publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeSimpleRedisToRunCrawlerScheduleJob.autohomeArticle());//文章
        //publishAutoHomeCrawlerScheduleTriggerInfo(AutoHomeSimpleRedisToRunCrawlerScheduleJob.autohomeScheduleCarHomeArticle());
    }

    /**
     * 发布汽车之家临时采集trigger info

     */
    public static void publishAutoHomeCrawlerScheduleTriggerInfo(CrawlerJob crawlerJob){

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeCommonCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "汽车之家临时采集任务执行，单次执行"
        );
    }/**
     * 发布汽车之家临时采集trigger info

     */
    public static void publishAutoHomeCrawlerScheduleTriggerInfo(CrawlerJob crawlerJob,String exp){

        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                AutoHomeCommonCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                exp,
                "汽车之家临时采集任务执行，单次执行"
        );
    }
}
